diff --git a/weboob/applications/pastoob/pastoob.py b/weboob/applications/pastoob/pastoob.py index 680d96b3..9e70ba2c 100644 --- a/weboob/applications/pastoob/pastoob.py +++ b/weboob/applications/pastoob/pastoob.py @@ -78,6 +78,10 @@ class Pastoob(ReplApplication): """ if not filename or filename == '-': contents = self.acquire_input() + if not len(contents): + print >>sys.stderr, 'Empty paste, aborting.' + return 1 + else: try: with codecs.open(filename, encoding=locale.getpreferredencoding()) as fp: