1. Larry Hastings
  2. mm

Commits

Larry Hastings  committed e8e9805

Added support for https:// URLs for archive fetcher.
(Easy--mm just needs to recognize the "https://"; part,
Python handles it from there.)

  • Participants
  • Parent commits 4f5244b
  • Branches default

Comments (0)

Files changed (1)

File mm/__init__.py

View file
                     # copy file down
                     destination = join(directory, basename(path))
                     shutil.copy2(path, destination)
-                elif path.startswith("http://"):
+                elif path.startswith(("http://", "https://")):
                     p = urllib.parse.urlparse(path)
                     destination = join(directory, basename(p.path))
                     # print "destination",destination
 
     @classmethod
     def _find_extension(cls, source):
-        if isfile(source) or source.startswith("http://"):
+        if isfile(source) or source.startswith(("http://", "https://")):
             bare_source = urllib.parse.urlparse(source).path
             for extension, decompressor in cls.constructor.extensions.items():
                 if bare_source.endswith(extension):