Example #1
0
 def get_contents(self):
     if not settings.AWS_ENABLED:
         try:
             return open(self.local_filename).read()
         except IOError:
             return ''
     else:
         return s3.read_file('source', self.s3_path)
Example #2
0
 def get_contents(self):
     if not settings.AWS_ENABLED:
         try:
             return open(self.local_filename).read()
         except IOError:
             return ''
     else:
         return s3.read_file('source', self.s3_path)
Example #3
0
 def read_build_log(self):
     if not settings.AWS_ENABLED:
         with open(self.build_log, 'r') as f:
             return f.read()
     else:
         return s3.read_file('builds', self.build_log)
Example #4
0
 def read_build_log(self):
     if not settings.AWS_ENABLED:
         with open(self.build_log, 'w') as f:
             return f.read()
     else:
         return s3.read_file('builds', self.build_log)
Example #5
0
 def get_contents(self):
     if not settings.AWS_ENABLED:
         return self._get_contents_local()
     else:
         return s3.read_file(self.bucket_name, self.s3_path)
Example #6
0
 def read_build_log(self):
     return s3.read_file('builds', self.build_log)
Example #7
0
 def get_contents(self):
     if not settings.AWS_ENABLED:
         return self._get_contents_local()
     else:
         return s3.read_file(self.bucket_name, self.s3_path)