replacing \n characters in a hash

Johhny exter_c at hotmail.com
Thu Jan 26 10:12:01 EST 2006


Hello,

Here is the code (minus my details section).

server = xmlrpclib.ServerProxy(url)

session = server.auth.login(username,password)

#functions.

def getErrata():

    channel_label = 'rhel-i386-as-4'

    errata =
server.channel.software.list_errata(session,channel_label,start_date,end_date)

    return errata



def getPackage(advisory):

    Package = server.errata.get_details(session,advisory)

    return Package



errata = getErrata()

for vals in errata:

  print "%s\t\t%s\t\t%s\t%s\t%s" %
(vals['errata_advisory'],vals['errata_issue_date'],vals['errata_update_date'],vals['errata_last_modified_date'],vals['errata_type'],)

  errata_info = getPackage(vals['errata_advisory'],)

  print errata_info['errata_topic']

  errata_package = errata_info['errata_topic']

  print getPackage(vals['errata_advisory'])

I have not got any of the section in to replace the \n's as I was
trying to work out why its not seeing what I thought was a string as a
dict.




More information about the Python-list mailing list