diff --git a/gns3server/handlers/file_upload_handler.py b/gns3server/handlers/file_upload_handler.py index edaf9488..194b6b6d 100644 --- a/gns3server/handlers/file_upload_handler.py +++ b/gns3server/handlers/file_upload_handler.py @@ -72,10 +72,11 @@ class FileUploadHandler(tornado.web.RequestHandler): Invoked on POST request. """ - fileinfo = self.request.files["file"][0] - destination_path = os.path.join(self._upload_dir, fileinfo['filename']) - with open(destination_path, 'wb') as f: - f.write(fileinfo['body']) - st = os.stat(destination_path) - os.chmod(destination_path, st.st_mode | stat.S_IXUSR) + if "file" in self.request.files: + fileinfo = self.request.files["file"][0] + destination_path = os.path.join(self._upload_dir, fileinfo['filename']) + with open(destination_path, 'wb') as f: + f.write(fileinfo['body']) + st = os.stat(destination_path) + os.chmod(destination_path, st.st_mode | stat.S_IXUSR) self.redirect("/upload") diff --git a/gns3server/modules/dynamips/hypervisor.py b/gns3server/modules/dynamips/hypervisor.py index ebf3a82d..afcd0e9f 100644 --- a/gns3server/modules/dynamips/hypervisor.py +++ b/gns3server/modules/dynamips/hypervisor.py @@ -276,8 +276,8 @@ class Hypervisor(DynamipsHypervisor): command = [self._path] command.extend(["-N1"]) # use instance IDs for filenames - if self._host != '0.0.0.0': - command.extend(['-H', self._host + ':' + str(self._port)]) + if self._host != "0.0.0.0" and self._host != "::": + command.extend(["-H", self._host + ":" + str(self._port)]) else: - command.extend(['-H', str(self._port)]) + command.extend(["-H", str(self._port)]) return command diff --git a/gns3server/version.py b/gns3server/version.py index 2a08f611..2be9d154 100644 --- a/gns3server/version.py +++ b/gns3server/version.py @@ -23,5 +23,5 @@ # or negative for a release candidate or beta (after the base version # number has been incremented) -__version__ = "1.0a2.dev3" +__version__ = "1.0-alpha2" __version_info__ = (1, 0, 0, -99)