diff --git a/command_line.py b/command_line.py index 9f3ae36..d3abbef 100644 --- a/command_line.py +++ b/command_line.py @@ -1,6 +1,6 @@ '''Command line module for web2exe.''' -__version__ = "v0.2.4b" +__version__ = "v0.2.5b" from utils import zip_files, join_files, log, get_temp_dir from pycns import save_icns diff --git a/main.py b/main.py index f8a2cad..f4a6fc7 100644 --- a/main.py +++ b/main.py @@ -6,6 +6,7 @@ import glob import sys import codecs import platform +import requests from PySide import QtGui, QtCore from PySide.QtGui import QApplication, QHBoxLayout, QVBoxLayout @@ -20,6 +21,9 @@ from utils import get_data_path, get_data_file_path MAX_RECENT = 10 +def url_exists(path): + r = requests.head(path) + return r.status_code == requests.codes.ok class Validator(QtGui.QRegExpValidator): def __init__(self, regex, action, parent=None): @@ -337,7 +341,7 @@ class MainWindow(QtGui.QMainWindow, CommandBase): if (setting.type == 'file' and setting.value and - not os.path.exists(setting_path)): + (not os.path.exists(setting_path) and not url_exists(setting.value))): log(setting.value, "does not exist") settings_valid = False widget = self.find_child_by_name(setting.name)