Bug 814503 - backtrace for zanata glossary push without "zanata.xml"
backtrace for zanata glossary push without "zanata.xml"
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: zanata-python-client (Show other bugs)
16
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: James Ni
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-19 22:40 EDT by Jens Petersen
Modified: 2012-06-13 22:14 EDT (History)
3 users (show)

See Also:
Fixed In Version: python client version: 1.3.5
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-06-13 22:14:58 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Jens Petersen 2012-04-19 22:40:03 EDT
Description of problem:
Running "zanata glossary push" in a empty (non-zanata) dir say
gives a backtrace, not an error message.

Version-Release number of selected component (if applicable):
zanata-python-client-1.3.4-1.fc16

How reproducible:
every time

Steps to Reproduce:
$ mkdir test
$ cd test
$ zanata glossary push
  
Actual results:
Traceback (most recent call last):
  File "/usr/bin/zanata", line 25, in <module>
    zanata.run()
  File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 1369, in run
    program_name=os.path.split(sys.argv[0])[1],
  File "/usr/lib/python2.7/site-packages/zanataclient/command.py", line 339, in handle_program
    command(command_options, args)
  File "/usr/lib/python2.7/site-packages/zanataclient/zanata.py", line 1291, in glossary_push
    url, username, apikey = optionsutil.apply_configfiles()
  File "/usr/lib/python2.7/site-packages/zanataclient/optionsutil.py", line 41, in apply_configfiles
    url = self.apply_project_config()
  File "/usr/lib/python2.7/site-packages/zanataclient/optionsutil.py", line 66, in apply_project_config
    self.project_config = self.config.read_project_config(path)
  File "/usr/lib/python2.7/site-packages/zanataclient/parseconfig.py", line 74, in read_project_config
    if os.path.getsize(filename) == 0:
  File "/usr/lib64/python2.7/genericpath.py", line 49, in getsize
    return os.stat(filename).st_size
OSError: [Errno 2] No such file or directory: '/home/petersen/test/zanata.xml'

Expected results:
Just something like "Missing 'zanata.xml' file?

Additional info:
I think better to avoid backtraces and catch
errors like the above one with a friendly error message.
Comment 1 James Ni 2012-04-19 22:48:30 EDT
Hi Jens,

Thanks a lot, i also find this issue, sorry for the inconvenience. I think i should do more test before i add new feature to python client and release a new version. I have commit the fix to git-hub, 

https://github.com/zanata/zanata-python-client/commit/b3e6a94face80a737f44df81e579605dd81c5989

I will include this fix in the new release, thanks
Comment 2 Fedora Update System 2012-04-26 05:59:03 EDT
zanata-python-client-1.3.5-1.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.5-1.fc15
Comment 3 Fedora Update System 2012-04-26 05:59:30 EDT
zanata-python-client-1.3.5-1.el5 has been submitted as an update for Fedora EPEL 5.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.5-1.el5
Comment 4 Fedora Update System 2012-04-26 05:59:54 EDT
zanata-python-client-1.3.5-1.fc16 has been submitted as an update for Fedora 16.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.5-1.fc16
Comment 5 Fedora Update System 2012-04-26 06:00:22 EDT
zanata-python-client-1.3.5-1.el6 has been submitted as an update for Fedora EPEL 6.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.5-1.el6
Comment 6 Fedora Update System 2012-04-26 06:00:52 EDT
zanata-python-client-1.3.5-1.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.5-1.fc17
Comment 7 Fedora Update System 2012-05-29 12:22:18 EDT
zanata-python-client-1.3.5-1.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 8 Fedora Update System 2012-05-29 17:53:50 EDT
zanata-python-client-1.3.5-1.fc16 has been pushed to the Fedora 16 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 9 Fedora Update System 2012-05-29 17:56:19 EDT
zanata-python-client-1.3.5-1.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 10 Fedora Update System 2012-05-30 21:14:26 EDT
zanata-python-client-1.3.5-1.el5 has been pushed to the Fedora EPEL 5 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 11 Fedora Update System 2012-05-30 21:14:58 EDT
zanata-python-client-1.3.5-1.el6 has been pushed to the Fedora EPEL 6 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.