← Back to team overview

yahoo-eng-team team mailing list archive

[Bug 1599169] [NEW] glance-replicator size raises "object of type 'NoneType' has no len()" exception when no args provided

 

Public bug reported:

We should check if `args is None` before doing `len(args)` to avoid a `object of type
'NoneType'` has no len()` error.

Currently what happens:

```
$ glance-replicator size
2016-07-04 09:51:19.030 30204 ERROR glance.cmd.replicator [-] replication_size size <server:port>

    Determine the size of a glance instance if dumped to disk.

    server:port: the location of the glance instance.

ERROR: object of type 'NoneType' has no len()
```

What I expect to happen:

```
$ glance-replicator size
2016-07-04 09:52:02.389 30483 ERROR glance.cmd.replicator [-] replication_size size <server:port>

    Determine the size of a glance instance if dumped to disk.

    server:port: the location of the glance instance.

ERROR: Too few arguments.
```

** Affects: glance
     Importance: Undecided
     Assignee: Marc Abramowitz (msabramo)
         Status: In Progress


** Tags: glance-replicator

** Changed in: glance
     Assignee: (unassigned) => Marc Abramowitz (msabramo)

-- 
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to Glance.
https://bugs.launchpad.net/bugs/1599169

Title:
  glance-replicator size raises "object of type 'NoneType' has no len()"
  exception when no args provided

Status in Glance:
  In Progress

Bug description:
  We should check if `args is None` before doing `len(args)` to avoid a `object of type
  'NoneType'` has no len()` error.

  Currently what happens:

  ```
  $ glance-replicator size
  2016-07-04 09:51:19.030 30204 ERROR glance.cmd.replicator [-] replication_size size <server:port>

      Determine the size of a glance instance if dumped to disk.

      server:port: the location of the glance instance.

  ERROR: object of type 'NoneType' has no len()
  ```

  What I expect to happen:

  ```
  $ glance-replicator size
  2016-07-04 09:52:02.389 30483 ERROR glance.cmd.replicator [-] replication_size size <server:port>

      Determine the size of a glance instance if dumped to disk.

      server:port: the location of the glance instance.

  ERROR: Too few arguments.
  ```

To manage notifications about this bug go to:
https://bugs.launchpad.net/glance/+bug/1599169/+subscriptions


Follow ups