X-Git-Url: https://git.distorted.org.uk/~mdw/stgit/blobdiff_plain/4db741b16855c96a8a1f09ce1c91e5670d29a30d..0a01a6d0eaf0c6a70819da2f73fc659e7a83b569:/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()