Merge pull request #449 from ihaveamac/patch-2

strip target_path of whitespace
This commit is contained in:
Steven Smith 2018-04-10 11:16:10 -07:00 committed by GitHub
commit 2bbab2f83a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -78,6 +78,7 @@ else:
print('Detecting host IP...')
hostIp = [(s.connect(('8.8.8.8', 53)), s.getsockname()[0], s.close()) for s in [socket.socket(socket.AF_INET, socket.SOCK_DGRAM)]][0][1]
target_path = target_path.strip()
if not os.path.exists(target_path):
print(target_path + ': No such file or directory.')
sys.exit(1)