summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorSamuel Ortiz <sameo@linux.intel.com>2013-01-09 00:45:49 +0100
committerSamuel Ortiz <sameo@linux.intel.com>2013-01-09 00:45:49 +0100
commit8295226de5207a5c7f9ed508d5e0361eeff8a61b (patch)
treec06babe557a28860d36942f97c4896f92c56a4b2 /test
parente807b5f38aaea6f125c0e63a1d62672ae954f46b (diff)
downloadneard-8295226de5207a5c7f9ed508d5e0361eeff8a61b.tar.gz
neard-8295226de5207a5c7f9ed508d5e0361eeff8a61b.tar.bz2
neard-8295226de5207a5c7f9ed508d5e0361eeff8a61b.zip
test: Remove the NDEF argument from ndef-agent
Since ndef-agent won't implement the handover agent API, no need to specify the NDEF argument.
Diffstat (limited to 'test')
-rwxr-xr-xtest/ndef-agent20
1 files changed, 10 insertions, 10 deletions
diff --git a/test/ndef-agent b/test/ndef-agent
index 1c7fb4d..350d0d3 100755
--- a/test/ndef-agent
+++ b/test/ndef-agent
@@ -41,12 +41,14 @@ class NDEFAgent(dbus.service.Object):
def print_usage():
print "Usage:"
- print "For NDEF agent:"
- print "%s NDEF Type=<record type>" % (sys.argv[0])
+ print "%s Type=<record type>" % (sys.argv[0])
print "Help: %s help" % (sys.argv[0])
sys.exit(1)
if __name__ == '__main__':
+ if len(sys.argv) != 2:
+ print_usage()
+
if len(sys.argv) == 2 and sys.argv[1] == "help":
print_usage()
@@ -56,13 +58,11 @@ if __name__ == '__main__':
manager = dbus.Interface(bus.get_object('org.neard', "/"),
'org.neard.Manager')
- if len(sys.argv) > 2:
- if sys.argv[1] == "NDEF":
- path = "/test/ndef/agent"
- object = NDEFAgent(bus, path)
- rec_type = sys.argv[2].replace("Type=", "", 1)
+ path = "/test/ndef/agent"
+ object = NDEFAgent(bus, path)
+ rec_type = sys.argv[1].replace("Type=", "", 1)
- manager.RegisterNDEFAgent(path, rec_type)
+ manager.RegisterNDEFAgent(path, rec_type)
- mainloop = gobject.MainLoop()
- mainloop.run()
+ mainloop = gobject.MainLoop()
+ mainloop.run()