Revision 4220c336 snf-astakos-app/astakos/im/management/commands/quota-verify.py

b/snf-astakos-app/astakos/im/management/commands/quota-verify.py
79 79
    def print_sync(self, diff_quotas):
80 80
        size = len(diff_quotas)
81 81
        if size == 0:
82
            self.stdout.write("No sync needed.\n")
82
            self.stderr.write("No sync needed.\n")
83 83
        else:
84
            self.stdout.write("Synced %s users:\n" % size)
84
            self.stderr.write("Synced %s users:\n" % size)
85 85
            uuids = diff_quotas.keys()
86 86
            users = AstakosUser.objects.filter(uuid__in=uuids)
87 87
            for user in users:
88
                self.stdout.write("%s (%s)\n" % (user.uuid, user.username))
88
                self.stderr.write("%s (%s)\n" % (user.uuid, user.username))
89 89

  
90 90
    def print_verify(self, qh_limits, diff_quotas):
91 91
        for holder, local in diff_quotas.iteritems():
92 92
            registered = qh_limits.pop(holder, None)
93 93
            user = get_user_by_uuid(holder)
94 94
            if registered is None:
95
                self.stdout.write(
95
                self.stderr.write(
96 96
                    "No quota for %s (%s) in quotaholder.\n" %
97 97
                    (holder, user.username))
98 98
            else:
......
105 105

  
106 106
        diffs = len(diff_quotas)
107 107
        if diffs:
108
            self.stdout.write("Quota differ for %d users.\n" % (diffs))
108
            self.stderr.write("Quota differ for %d users.\n" % (diffs))

Also available in: Unified diff