Classes | Functions
samweb_client.http_client Namespace Reference

Classes

class  SAMWebHTTPClient
 

Functions

def _get_from ()
 
def escape_url_component (s)
 

Function Documentation

def samweb_client.http_client._get_from ( )
private

Definition at line 6 of file http_client.py.

6 def _get_from():
7  import pwd,socket
8  username = os.environ.get('GRID_USER', os.environ.get('USER'))
9  if not username:
10  try:
11  username = pwd.getpwuid(os.getuid()).pw_name
12  except:
13  username = 'unknown'
14  try:
15  return '%s@%s' % (username, socket.getfqdn())
16  except:
17  return username
18 
19 
20 
def samweb_client.http_client.escape_url_component (   s)