If I use pysrt with a not existed file I get this error message
$ srt -i shift 3s hello.txt
Traceback (most recent call last):
File "/Users/pablo/.envs/pysrt/bin/srt", line 9, in <module>
load_entry_point('pysrt', 'console_scripts', 'srt')()
File "/Users/pablo/src/pysrt/pysrt/commands.py", line 216, in main
SubRipShifter().run(sys.argv[1:])
File "/Users/pablo/src/pysrt/pysrt/commands.py", line 136, in run
self.create_backup()
File "/Users/pablo/src/pysrt/pysrt/commands.py", line 176, in create_backup
shutil.copy2(self.arguments.file, backup_file)
File "/Users/pablo/opt/src/homebrew/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 130, in copy2
copyfile(src, dst)
File "/Users/pablo/opt/src/homebrew/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/shutil.py", line 82, in copyfile
with open(src, 'rb') as fsrc:
IOError: [Errno 2] No such file or directory: 'hello.txt'
This changes fix the error message, but I use the print of python 2.7 ... this print don't work in python 3.x
Coverage decreased (-0.3%) to 71.458% when pulling dbeac0e71a3a8efd1a99586bb91080285c4fa19c on juanpabloaj:no-file-message into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.
Coverage decreased (-0.4%) to 71.311% when pulling 1274f48c561dc6ddfaa7d351df637100d0be368a on juanpabloaj:no-file-message into 331b344656052a8444ba5b85974972defe0d028f on byroot:master.
If I use
pysrt
with a not existed file I get this error messageThis changes fix the error message, but I use the
print
of python 2.7 ... this print don't work in python 3.x