示例#1
0
文件: layer.py 项目: wri/gfw-sync2
    def archive_output(self, a):
        if a:
            archive_dir = os.path.dirname(a)

            if r's3://' not in archive_dir and not os.path.exists(archive_dir):
                util.mkdir_p(archive_dir)

        self._archive_output = a
示例#2
0
文件: layer.py 项目: wri/gfw-sync2
    def archive_output(self, a):
        if not a:
            logging.error("archive_output cannot be empty. Exiting now.")
            sys.exit(1)

        archive_dir = os.path.dirname(a)

        if not os.path.exists(archive_dir):
            util.mkdir_p(archive_dir)

        self._archive_output = a
示例#3
0
    def archive_output(self, a):
        if not a:
            logging.error("archive_output cannot be empty. Exiting now.")
            sys.exit(1)

        archive_dir = os.path.dirname(a)

        if not os.path.exists(archive_dir):
            util.mkdir_p(archive_dir)

        self._archive_output = a
示例#4
0
文件: layer.py 项目: wri/gfw-sync2
    def download_output(self, d):
        if not d:
            logging.warning("No download_output specified")
            d = None

        else:
            download_dir = os.path.dirname(d)

            if not os.path.exists(download_dir):
                util.mkdir_p(download_dir)

        self._download_output = d
示例#5
0
    def download_output(self, d):
        if not d:
            logging.warning("No download_output specified")
            d = None

        else:
            download_dir = os.path.dirname(d)

            if not os.path.exists(download_dir):
                util.mkdir_p(download_dir)

        self._download_output = d
示例#6
0
 def download_workspace(self, d):
     if os.path.exists(d):
         shutil.rmtree(d)
     util.mkdir_p(d)
     self._download_workspace = d
示例#7
0
 def download_workspace(self, d):
     if os.path.exists(d):
         shutil.rmtree(d)
     util.mkdir_p(d)
     self._download_workspace = d