equal
deleted
inserted
replaced
232 return True |
232 return True |
233 finally: |
233 finally: |
234 os.rmdir(d) |
234 os.rmdir(d) |
235 |
235 |
236 def has_root(): |
236 def has_root(): |
237 return os.geteuid() == 0 |
237 return getattr(os, 'geteuid', None) and os.geteuid() == 0 |
238 |
238 |
239 def has_pyflakes(): |
239 def has_pyflakes(): |
240 return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"", |
240 return matchoutput("sh -c \"echo 'import re' 2>&1 | pyflakes\"", |
241 r"<stdin>:1: 're' imported but unused", |
241 r"<stdin>:1: 're' imported but unused", |
242 True) |
242 True) |