From f027c2ae24fb333dbb9c6e4dccd0034876bb05e9 Mon Sep 17 00:00:00 2001 From: Pavol Babincak Date: Aug 11 2014 16:03:21 +0000 Subject: Revert "refactor: PEP 8 compliance of __init__.py" This reverts commit 116ecc72eecb24fa4679ab226796ce893bce3f50. Let's revert of revert with same commit message as original commit. --- diff --git a/src/fedpkg/__init__.py b/src/fedpkg/__init__.py index 9f2ce49..0d31491 100644 --- a/src/fedpkg/__init__.py +++ b/src/fedpkg/__init__.py @@ -18,6 +18,7 @@ import pycurl import fedora_cert import platform + # This check (decorator) can go away after a few months def _check_newstyle_branches(func): """Check to see if the branches are "newstyle" or not. @@ -57,6 +58,7 @@ def _check_newstyle_branches(func): return func(self, *args, **kwargs) return(checky) + class Commands(pyrpkg.Commands): def __init__(self, path, lookaside, lookasidehash, lookaside_cgi, @@ -68,9 +70,9 @@ class Commands(pyrpkg.Commands): # We are subclassing to set kojiconfig to none, so that we can # make it a property to potentially use a secondary config super(Commands, self).__init__(path, lookaside, lookasidehash, - lookaside_cgi, gitbaseurl, anongiturl, - branchre, kojiconfig, build_client, user, - dist, target, quiet) + lookaside_cgi, gitbaseurl, anongiturl, + branchre, kojiconfig, build_client, + user, dist, target, quiet) # New data self.secondary_arch = { @@ -321,7 +323,7 @@ class Commands(pyrpkg.Commands): # We may not have Fedoras. Find out what rawhide target does. try: rawhidetarget = self.anon_kojisession.getBuildTarget( - 'rawhide') + 'rawhide') except: # We couldn't hit koji, bail. raise pyrpkg.rpkgError('Unable to query koji to find rawhide \ @@ -335,21 +337,21 @@ class Commands(pyrpkg.Commands): """ try: - mydist = platform.linux_distribution() + mydist = platform.linux_distribution() except: - # This is marked as eventually being deprecated. - try: - mydist = platform.dist() - except: - runtime_os = 'unknown' - runtime_version = '0' + # This is marked as eventually being deprecated. + try: + mydist = platform.dist() + except: + runtime_os = 'unknown' + runtime_version = '0' if mydist: - runtime_os = mydist[0] - runtime_version = mydist[1] + runtime_os = mydist[0] + runtime_version = mydist[1] else: - runtime_os = 'unknown' - runtime_version = '0' + runtime_os = 'unknown' + runtime_version = '0' if runtime_os in ['redhat', 'centos']: return 'el%s' % runtime_version @@ -366,8 +368,6 @@ class Commands(pyrpkg.Commands): Runs the commands and returns nothing """ - - cmd = ['git'] if self.quiet: cmd.append('--quiet') @@ -383,7 +383,6 @@ class Commands(pyrpkg.Commands): self.commit(message=message) - def update(self, template='bodhi.template', bugs=[]): """Submit an update to bodhi using the provided template."""