summaryrefslogtreecommitdiff
path: root/example.py
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2011-08-29 18:34:38 +0100
committerLars Wirzenius <liw@liw.fi>2011-08-29 18:34:38 +0100
commitf241b0d86e1bb4bb81ab118ef0ec3baed6afbf0c (patch)
tree84aa482fdcab9cf36ad4c1f5e4b17f4b9e9bd92b /example.py
parent283cb2fd81cf442e59dd41af17795f666b1f2f45 (diff)
downloadttystatus-f241b0d86e1bb4bb81ab118ef0ec3baed6afbf0c.tar.gz
Add a way to print error messages to stderr.
Diffstat (limited to 'example.py')
-rw-r--r--example.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/example.py b/example.py
index ddb5500..909ce46 100644
--- a/example.py
+++ b/example.py
@@ -60,6 +60,8 @@ def main():
if os.path.islink(pathname):
ts['symlink'] = pathname
ts.notify('Symlink! %s' % pathname)
+ elif 'error' in pathname:
+ ts.error('Error in pathname: %s' % pathname)
ts['done'] += 1
ts.finish()