equal
deleted
inserted
replaced
227 def getuser(): |
227 def getuser(): |
228 '''return name of current user''' |
228 '''return name of current user''' |
229 raise Abort(_('user name not available - set USERNAME ' |
229 raise Abort(_('user name not available - set USERNAME ' |
230 'environment variable')) |
230 'environment variable')) |
231 |
231 |
232 def expand_glob(pats): |
|
233 '''On Windows, expand the implicit globs in a list of patterns''' |
|
234 ret = [] |
|
235 for p in pats: |
|
236 kind, name = patkind(p, None) |
|
237 if kind is None: |
|
238 globbed = glob.glob(name) |
|
239 if globbed: |
|
240 ret.extend(globbed) |
|
241 continue |
|
242 # if we couldn't expand the glob, just keep it around |
|
243 ret.append(p) |
|
244 return ret |
|
245 |
|
246 def username(uid=None): |
232 def username(uid=None): |
247 """Return the name of the user with the given uid. |
233 """Return the name of the user with the given uid. |
248 |
234 |
249 If uid is None, return the name of the current user.""" |
235 If uid is None, return the name of the current user.""" |
250 return None |
236 return None |