1
0
mirror of https://github.com/openSUSE/osc.git synced 2025-01-26 22:56:15 +01:00

fixed some warnings from pychecker

This commit is contained in:
Danny Kukawka 2010-06-15 17:07:14 +02:00
parent 343fd89f4c
commit 1c02a1bd06
2 changed files with 2 additions and 4 deletions

View File

@ -948,7 +948,7 @@ Please submit there instead, or use --nodevelproject to force direct submission.
print 'created request id', result
def _actionparser(option, opt_str, value, parser):
def _actionparser(self, opt_str, value, parser):
value = []
if not hasattr(parser.values, 'actiondata'):
setattr(parser.values, 'actiondata', [])

View File

@ -4474,9 +4474,7 @@ def unpack_srcrpm(srpm, dir, *files):
print >>sys.stderr, 'error - \'%s\' is not a source rpm.' % srpm
sys.exit(1)
curdir = os.getcwd()
if not os.path.isdir(dir):
dir = curdir
else:
if os.path.isdir(dir):
os.chdir(dir)
cmd = 'rpm2cpio %s | cpio -i %s &> /dev/null' % (srpm, ' '.join(files))
ret = subprocess.call(cmd, shell=True)