#NEWLINE# def parse_apt_repo( name ) : #NEWLINE# #INDENT# regex = '^(deb(?:-src)?)\\s+([^\\s]+)\\s+([a-z-]+)\\s+([a-z-\\s]*)$' #NEWLINE# matches = re . match ( matches , name ) #NEWLINE# if matches : #NEWLINE# #INDENT# return ( matches . group ( 2 ) , { #NEWLINE# #INDENT# 'type' : matches . group ( 1 ) , #NEWLINE# 'distribution' : matches . group ( 3 ) , #NEWLINE# 'components' : matches . group ( 4 ) . split ( ) , #NEWLINE# #UNINDENT# } )