~ubuntu-branches/ubuntu/utopic/simplestreams/utopic

« back to all changes in this revision

Viewing changes to simplestreams/util.py

  • Committer: Package Import Robot
  • Author(s): Scott Moser
  • Date: 2013-10-22 19:35:38 UTC
  • mfrom: (1.1.10)
  • Revision ID: package-import@ubuntu.com-20131022193538-b13am9oat7i1n8zj
Tags: 0.1.0~bzr323-0ubuntu1
* New upstream snapshot.
  * fix bug with sstream-sync (LP: #1241711)
  * fix bug in glance mirror (LP: #1243433)
  * fix odd behavior bug when filtering.  The result was that if you
    had ever run with a filter, subsequent runs with modified filter
    would not see different results (LP: #1238227).

Show diffs side-by-side

added added

removed removed

Lines of Context:
68
68
 
69
69
 
70
70
def products_exdata(tree, pedigree, include_top=True, insert_fieldnames=True):
 
71
    # given 'tree' and 'pedigree' return a 'flattened' dict that contains
 
72
    # entries for all attributes of this item those that apply to its pedigree
71
73
    harchy = PRODUCTS_TREE_DATA
72
74
 
73
75
    exdata = {}
390
392
    bad = (".." + os.path.sep, "..." + os.path.sep)
391
393
    for tok in bad:
392
394
        if path.startswith(tok):
393
 
            raise TypeError("Path '%s' starts with %s" % (path, tok))
 
395
            raise TypeError("Path '%s' starts with '%s'" % (path, tok))
394
396
    bad = (os.path.sep + ".." + os.path.sep, os.path.sep + "..." + os.path.sep)
395
397
    for tok in bad:
396
398
        if tok in path:
397
 
            raise TypeError("Path '%s' contains with %s" % (path, tok))
 
399
            raise TypeError("Path '%s' contains '%s'" % (path, tok))
398
400
 
399
401
 
400
402
def read_url(url):