X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/be3e6bd9308ad0b1cae54bd8ff9502bcf7713129..d884c4d8fd0a990d0746c7964bfd979a625c7ab2:/stgit/commands/fold.py diff --git a/stgit/commands/fold.py b/stgit/commands/fold.py index a9bb7fa..8b796ca 100644 --- a/stgit/commands/fold.py +++ b/stgit/commands/fold.py @@ -60,7 +60,10 @@ def func(parser, options, args): raise CmdException, 'No patches applied' if filename: - print 'Folding patch "%s"...' % filename, + if os.path.exists(filename): + print 'Folding patch "%s"...' % filename, + else: + raise CmdException, 'No such file: %s' % filename else: print 'Folding patch from stdin...', sys.stdout.flush()