Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(46)

Side by Side Diff: appengine/swarming/cipd.py

Issue 2013943002: Changing license header, again! (Closed) Base URL: git@github.com:luci/luci-py.git@master
Patch Set: Fixed third parties Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « appengine/swarming/appengine_config.py ('k') | appengine/swarming/elements/stats-app.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2016 The LUCI Authors. All rights reserved. 1 # Copyright 2016 The LUCI Authors. All rights reserved.
2 # Use of this source code is governed by the Apache v2.0 license that can be 2 # Use of this source code is governed under the Apache License, Version 2.0
3 # found in the LICENSE file. 3 # that can be found in the LICENSE file.
4 4
5 """CIPD-specific code is concentrated here.""" 5 """CIPD-specific code is concentrated here."""
6 6
7 import re 7 import re
8 8
9 # Regular expressions below are copied from 9 # Regular expressions below are copied from
10 # https://chromium.googlesource.com/infra/infra/+/468bb43/appengine/chrome_infra _packages/cipd/impl.py 10 # https://chromium.googlesource.com/infra/infra/+/468bb43/appengine/chrome_infra _packages/cipd/impl.py
11 # https://chromium.googlesource.com/infra/infra/+/468bb43/appengine/chrome_infra _packages/cas/impl.py 11 # https://chromium.googlesource.com/infra/infra/+/468bb43/appengine/chrome_infra _packages/cas/impl.py
12 12
13 PACKAGE_NAME_RE = re.compile(r'^([a-z0-9_\-]+/)*[a-z0-9_\-]+$') 13 PACKAGE_NAME_RE = re.compile(r'^([a-z0-9_\-]+/)*[a-z0-9_\-]+$')
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 """True if string looks like a valid package instance tag.""" 58 """True if string looks like a valid package instance tag."""
59 if not tag or ':' not in tag or len(tag) > TAG_MAX_LEN: 59 if not tag or ':' not in tag or len(tag) > TAG_MAX_LEN:
60 return False 60 return False
61 # Care only about the key. Value can be anything (including empty string). 61 # Care only about the key. Value can be anything (including empty string).
62 return bool(TAG_KEY_RE.match(tag.split(':', 1)[0])) 62 return bool(TAG_KEY_RE.match(tag.split(':', 1)[0]))
63 63
64 64
65 def is_pinned_version(version): 65 def is_pinned_version(version):
66 """Returns True if |version| is pinned.""" 66 """Returns True if |version| is pinned."""
67 return bool(INSTANCE_ID_RE.match(version)) or is_valid_tag(version) 67 return bool(INSTANCE_ID_RE.match(version)) or is_valid_tag(version)
OLDNEW
« no previous file with comments | « appengine/swarming/appengine_config.py ('k') | appengine/swarming/elements/stats-app.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698