def _clean_pkglist(pkgs):
 for (name, versions) in six.iteritems(pkgs):
  stripped = [v for v in versions if (v != '1')]
  if (not stripped):
   pkgs[name] = ['1']
  elif (versions != stripped):
   pkgs[name] = stripped

def _clean_pkglist ( pkgs ) : for ( name , versions ) in six . iteritems ( pkgs ) : stripped = [ v for v in versions if ( v != '1' ) ] if ( not stripped ) : pkgs [ name ] = [ '1' ] elif ( versions != stripped ) : pkgs [ name ] = stripped
go through package list and .