Modify

Ticket #1115 (closed defect: fixed)

Opened 11 years ago

Last modified 11 years ago

ProbeData object doesn't behave like a str() anymore

Reported by: https://www.google.com/accounts/o8/id?id=AItOawkfar6gGD3PuUixQdEZQyRr2mpowLW1A70 Owned by: desai
Priority: major Milestone: Bcfg2 1.3.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Probe Cc:

Description

In testing my migration to 1.2.x I've noticed I can no longer treat probe data as a string:

len(metadata.Probes.get('system-memory'))

Traceback (most recent call last):

File "<console>", line 1, in <module>

TypeError?: object of type 'ProbeData?' has no len()

or

'104' in metadata.Probes.get('system-memory')

Traceback (most recent call last):

File "<console>", line 1, in <module>

TypeError?: argument of type 'ProbeData?' is not iterable

There is a string at .data but due to the way I test that an object is populated with .get('probe_name', 'default'), this makes it hard to get at the data.

Can the ProbeData? please inherit the properties of a str() object?

Attachments

Change History

comment:1 Changed 11 years ago by solj

Moving to 1.3

comment:2 Changed 11 years ago by solj

  • Milestone changed from Bcfg2 1.2.3 Release (Bugfix) to Bcfg2 1.3.0 Release

comment:3 Changed 11 years ago by https://www.google.com/accounts/o8/id?id=AItOawnSjgovXZr-_V3vGkvMSR0pc5LDykRc1Nc

  • Status changed from new to closed
  • Resolution set to fixed

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.