@@ -237,7 +237,18 @@ def _parse_atom_entry(entry):
237237
238238 # Filter some of the noise out of the content record
239239 content = record ((k , v ) for k , v in content .iteritems ()
240- if k not in ['eai:acl' , 'eai:attributes' , 'type' ])
240+ if k not in ['eai:acl' , 'eai:attributes' ])
241+
242+ if isinstance (content ['type' ], list ):
243+ content ['type' ] = [t for t in content ['type' ] if t != 'text/xml' ]
244+ # Unset type if it was only 'text/xml'
245+ if len (content ['type' ]) == 0 :
246+ content .pop ('type' , None )
247+ # Flatten 1 element list
248+ if len (content ['type' ]) == 1 :
249+ content ['type' ] = content ['type' ][0 ]
250+ else :
251+ content .pop ('type' , None )
241252
242253 return record ({
243254 'title' : title ,
@@ -1619,7 +1630,7 @@ def get(self, name="", owner=None, app=None, sharing=None, **query):
16191630 name = UrlEncoded (name , encode_slash = True )
16201631 return super (Collection , self ).get (name , owner , app , sharing , ** query )
16211632
1622-
1633+
16231634
16241635
16251636class ConfigurationFile (Collection ):
@@ -1799,7 +1810,7 @@ def create(self, password, username, realm=None):
17991810 storage_password = StoragePassword (self .service , self ._entity_path (state ), state = state , skip_refresh = True )
18001811
18011812 return storage_password
1802-
1813+
18031814 def delete (self , username , realm = None ):
18041815 """Delete a storage password by username and/or realm.
18051816
@@ -1977,7 +1988,7 @@ def clean(self, timeout=60):
19771988 :return: The :class:`Index`.
19781989 """
19791990 self .refresh ()
1980-
1991+
19811992 tds = self ['maxTotalDataSizeMB' ]
19821993 ftp = self ['frozenTimePeriodInSecs' ]
19831994 was_disabled_initially = self .disabled
@@ -1996,7 +2007,7 @@ def clean(self, timeout=60):
19962007 while self .content .totalEventCount != '0' and datetime .now () < start + diff :
19972008 sleep (1 )
19982009 self .refresh ()
1999-
2010+
20002011 if self .content .totalEventCount != '0' :
20012012 raise OperationError , "Cleaning index %s took longer than %s seconds; timing out." % \
20022013 (self .name , timeout )
@@ -2941,7 +2952,7 @@ def export(self, query, **params):
29412952 raise TypeError ("Cannot specify an exec_mode to export." )
29422953 params ['segmentation' ] = params .get ('segmentation' , 'none' )
29432954 return self .post (path_segment = "export" ,
2944- search = query ,
2955+ search = query ,
29452956 ** params ).body
29462957
29472958 def itemmeta (self ):
@@ -3004,7 +3015,7 @@ def oneshot(self, query, **params):
30043015 raise TypeError ("Cannot specify an exec_mode to oneshot." )
30053016 params ['segmentation' ] = params .get ('segmentation' , 'none' )
30063017 return self .post (search = query ,
3007- exec_mode = "oneshot" ,
3018+ exec_mode = "oneshot" ,
30083019 ** params ).body
30093020
30103021
@@ -3032,7 +3043,8 @@ def __init__(self, service, path, **kwargs):
30323043 def value (self ):
30333044 """Returns the message value.
30343045
3035- :return: The :class:`Loggers` collection.
3046+ :return: The message value.
3047+ :rtype: ``string``
30363048 """
30373049 return self [self .name ]
30383050
0 commit comments