parameters: (self, ticket)
return_statement: return True
docstring: method to clear the temp directory where files will be uploaded to
docstring_summary: method to clear the temp directory where files will be uploaded to
docstring_tokens: method to clear the temp directory where files will be uploaded to
function: def clear_upload_dir(self, ticket):
          '''method to clear the temp directory where files will be uploaded to'''
          upload_dir = Environment.get_upload_dir()
          if not os.path.exists(upload_dir):
              return False
  
          if not os.path.isdir (upload_dir):
              return False
  
          # put in a failsafe
          tmp_dir = Environment.get_tmp_dir()
          assert upload_dir.startswith(tmp_dir)
  
          shutil.rmtree(upload_dir)
          return True
function_tokens: def clear_upload_dir ( self , ticket ) : upload_dir = Environment . get_upload_dir ( ) if not os . path . exists ( upload_dir ) : return False if not os . path . isdir ( upload_dir ) : return False # put in a failsafe tmp_dir = Environment . get_tmp_dir ( ) assert upload_dir . startswith ( tmp_dir ) shutil . rmtree ( upload_dir ) return True