Allow output file or '-' for stdout with list of IP addresses

This doesn't seem quite right, because it doesn't match
a supposedly legal use case where you omit the output file
and list the node IP addresses. However, it's better than
what we have now, which simply ignores the output file name.

Intended to help with ONOS-4667

Change-Id: Ib46195e7b829bc4d304c4dd51138b73acd4f1501
diff --git a/tools/test/bin/onos-gen-partitions b/tools/test/bin/onos-gen-partitions
index e69bcc1..8221710 100755
--- a/tools/test/bin/onos-gen-partitions
+++ b/tools/test/bin/onos-gen-partitions
@@ -55,7 +55,7 @@
          }
   output = json.dumps(data, indent=4)
 
-  if len(sys.argv) == 2:
+  if len(sys.argv) >= 2 and sys.argv[1] != '-':
     filename = sys.argv[1]
     with open(filename, 'w') as f:
       f.write(output)