Bug 696505

Summary: RFE: reduce duplication of code
Product: [Fedora] Fedora Reporter: Sean Flanigan <sflaniga>
Component: zanata-python-clientAssignee: anish <apatil>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: dchen, kent.neo, petersen, zanata-bugs
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: zanata-python-client-1.3.18-1.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-12-12 04:35:46 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Sean Flanigan 2011-04-14 07:42:40 UTC
The python client has a lot of code which is near-identical between publican-push & po-push, publican-pull & po-pull, etc.  

The same goes for the code which checks for user_name and apikey, which is repeated in many of the command methods in zanata.py.  The methods in docservice.py have a lot of duplicate code around api keys and handling of HTTP response codes.

Also the basic usage text in _print_usage() appears again in _print_help_info().

The duplicate code should be factored out into separate methods to improve readability and maintainability.

Comment 1 Fedora End Of Life 2013-01-16 22:54:30 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 2 Fedora Admin XMLRPC Client 2013-08-13 04:45:07 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 3 Fedora Update System 2014-12-03 07:57:00 UTC
zanata-python-client-1.3.18-1.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.18-1.fc20

Comment 4 Fedora Update System 2014-12-03 07:57:28 UTC
zanata-python-client-1.3.18-1.el7 has been submitted as an update for Fedora EPEL 7.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.18-1.el7

Comment 5 Fedora Update System 2014-12-03 07:57:50 UTC
zanata-python-client-1.3.18-1.fc21 has been submitted as an update for Fedora 21.
https://admin.fedoraproject.org/updates/zanata-python-client-1.3.18-1.fc21

Comment 6 Fedora Update System 2014-12-03 16:06:26 UTC
Package zanata-python-client-1.3.18-1.fc21:
* should fix your issue,
* was pushed to the Fedora 21 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing zanata-python-client-1.3.18-1.fc21'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-16198/zanata-python-client-1.3.18-1.fc21
then log in and leave karma (feedback).

Comment 7 Fedora Update System 2014-12-12 04:35:46 UTC
zanata-python-client-1.3.18-1.fc21 has been pushed to the Fedora 21 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 8 Fedora Update System 2014-12-13 09:45:08 UTC
zanata-python-client-1.3.18-1.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 9 Fedora Update System 2014-12-20 00:16:19 UTC
zanata-python-client-1.3.18-1.el7 has been pushed to the Fedora EPEL 7 stable repository.  If problems still persist, please make note of it in this bug report.