summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Sulfrian <alexander@sulfrian.net>2013-05-17 15:34:55 +0200
committerAlexander Sulfrian <alexander@sulfrian.net>2013-05-17 15:39:44 +0200
commit637af2c1d85e9620d3a9e8a593bccb7e51b5d125 (patch)
tree5028b8c5ab2b0e3b401c74eb873766517b7ebab6
parentb8053ff61cb34cd2e962a66f49750e66d53d0ab5 (diff)
downloadtools-637af2c1d85e9620d3a9e8a593bccb7e51b5d125.tar.gz
tools-637af2c1d85e9620d3a9e8a593bccb7e51b5d125.tar.bz2
tools-637af2c1d85e9620d3a9e8a593bccb7e51b5d125.zip
bin/hostinfo: write error messages to stderr0.1.6
-rwxr-xr-xbin/hostinfo5
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/hostinfo b/bin/hostinfo
index 88fe388..9caca84 100755
--- a/bin/hostinfo
+++ b/bin/hostinfo
@@ -115,8 +115,7 @@ def main():
if any([o in opts for o in ['--path', '-p']]):
basepath = [opts[o] for o in ['--path', '-p'] if o in opts][0]
except getopt.GetoptError, e:
- print("Error: %s" % e)
- print
+ sys.stderr.write("Error: %s\n\n" % e)
args = []
if hosts:
@@ -132,7 +131,7 @@ def main():
path = find_host(basepath, args[0])
if path is None:
- print("Host '%s' could not be found!" % args[0])
+ sys.stderr.write("Host '%s' could not be found!\n" % args[0])
sys.exit(1)
if file: