diff --git a/cdoseaplay/update.py b/cdoseaplay/update.py index 3010612..fd243e1 100755 --- a/cdoseaplay/update.py +++ b/cdoseaplay/update.py @@ -59,7 +59,10 @@ def update_video(url, name): if folder and not os.path.exists(folder): os.makedirs(folder) if os.path.exists(name): - head = requests.head(url, allow_redirects=True) + try: + head = requests.head(url, allow_redirects=True) + except KeyboardInterrupt: + sys.exit(-1) modified = head.headers.get("Last-Modified") if modified: mtime = time.mktime(datetime.strptime(modified, "%a, %d %b %Y %X GMT").timetuple())