81 |
|
msg+="\n Use GRID.se_white_list and/or GRID.se_black_list instead" |
82 |
|
raise CrabException(msg) |
83 |
|
|
84 |
+ |
|
85 |
+ |
# make sure proxy FQAN has not changed since last time |
86 |
+ |
command = "voms-proxy-info -identity -fqan 2>/dev/null" |
87 |
+ |
command += " | head -2" |
88 |
+ |
identity = runCommand(command) |
89 |
+ |
idfile = common.work_space.shareDir() + "GridIdentity" |
90 |
+ |
if os.access(idfile, os.F_OK) : |
91 |
+ |
# identity file exists from previous commands |
92 |
+ |
f=open(idfile, 'r') |
93 |
+ |
idFromFile=f.read() |
94 |
+ |
f.close() |
95 |
+ |
else : |
96 |
+ |
# create it |
97 |
+ |
f=open(idfile, 'w') |
98 |
+ |
f.write(identity) |
99 |
+ |
f.close() |
100 |
+ |
idFromFile = identity |
101 |
+ |
|
102 |
+ |
if identity != idFromFile: |
103 |
+ |
msg = "Wrong Grid Credentials:\n%s" % identity |
104 |
+ |
msg += "\nMake sure you have " |
105 |
+ |
msg += " DN, FQAN =\n%s" % idFromFile |
106 |
+ |
raise CrabException(msg) |
107 |
+ |
|
108 |
|
return |
109 |
|
|
110 |
|
def userName(self): |