diff --git a/osc/commandline.py b/osc/commandline.py index ff17aad3..bdeee734 100644 --- a/osc/commandline.py +++ b/osc/commandline.py @@ -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', []) diff --git a/osc/core.py b/osc/core.py index e8ea0922..9b79b8e8 100644 --- a/osc/core.py +++ b/osc/core.py @@ -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)