def get_temp_dir():
 import getpass
 if hasattr(os, u'getuid'):
  uid = (u'u%d' % os.getuid())
 else:
  try:
   uid = getpass.getuser()
  except ImportError:
   return os.path.join(tempfile.gettempdir(), u'sickrage')
 return os.path.join(tempfile.gettempdir(), (u'sickrage-%s' % uid))

def get_temp_dir ( ) : import getpass if hasattr ( os , u'getuid' ) : uid = ( u'u%d' % os . getuid ( ) ) else : try : uid = getpass . getuser ( ) except ImportError : return os . path . join ( tempfile . gettempdir ( ) , u'sickrage' ) return os . path . join ( tempfile . gettempdir ( ) , ( u'sickrage-%s' % uid ) )
returns a temporary directory .