From: Tom Hunger Date: Mon, 26 Jan 2015 16:14:00 +0000 (+0000) Subject: Document how to claim a printer for another user and fix fake claim command. X-Git-Url: https://git.aero2k.de/?a=commitdiff_plain;h=64238c92225ef2acdb49c969a98c346a21352fb9;p=sirius.git Document how to claim a printer for another user and fix fake claim command. --- diff --git a/README.md b/README.md index 1f0ace3..62fe42c 100644 --- a/README.md +++ b/README.md @@ -35,6 +35,12 @@ To create a fake friend from twitter who signed up do this: $ ./manage.py fake user stephenfry ``` +You can also claim a printer in somebody else's name: + +```console +$ ./manage.py fake claim b7235a2b432585eb quentinsf 342f-eyh0-korc-msej testprinter +``` + # Sirius Architecture ## Layers diff --git a/sirius/fake/commands.py b/sirius/fake/commands.py index 13eaebc..97305d1 100644 --- a/sirius/fake/commands.py +++ b/sirius/fake/commands.py @@ -46,6 +46,7 @@ def claim(device_address, owner, code, name): user = user_model.User.query.filter_by(username=owner).first() if user is None: print("User not found: {}".format(owner)) + return hardware.Printer.phone_home(device_address) user.claim_printer(code, name)