Example #1
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         try:
             shutil.copy(self.local_filename, path)
         except IOError as err:
             if err.errno == 2:
                 open(path, 'w').close()  # create the file if it's missing.
             else:
                 raise
     else:
         s3.read_file_to_filesystem('source', self.s3_path, path)
Example #2
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         try:
             shutil.copy(self.local_filename, path)
         except IOError as err:
             if err.errno == 2:
                 open(path, 'w').close()  # create the file if it's missing.
             else:
                 raise
     else:
         s3.read_file_to_filesystem('source', self.s3_path, path)
Example #3
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         shutil.copy(self.local_filename, path)
     else:
         s3.read_file_to_filesystem('source', self.s3_path, path)
Example #4
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         shutil.copy(self.local_filename, path)
     else:
         s3.read_file_to_filesystem('source', self.s3_path, path)
Example #5
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         self._copy_to_path_local(path)
     else:
         s3.read_file_to_filesystem(self.bucket_name, self.s3_path, path)
Example #6
0
 def copy_to_path(self, path):
     if not settings.AWS_ENABLED:
         self._copy_to_path_local(path)
     else:
         s3.read_file_to_filesystem(self.bucket_name, self.s3_path, path)