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

Side by Side Diff: client/libs/logdog/streamname.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 | « client/libs/logdog/stream.py ('k') | client/libs/logdog/tests/bootstrap_test.py » ('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 import re 5 import re
6 import types 6 import types
7 7
8 _SEGMENT_RE_BASE = r'[a-zA-Z0-9][a-zA-Z0-9:_\-.]*' 8 _SEGMENT_RE_BASE = r'[a-zA-Z0-9][a-zA-Z0-9:_\-.]*'
9 _STREAM_NAME_RE = re.compile('^(' + _SEGMENT_RE_BASE + ')(/' + 9 _STREAM_NAME_RE = re.compile('^(' + _SEGMENT_RE_BASE + ')(/' +
10 _SEGMENT_RE_BASE + ')*$') 10 _SEGMENT_RE_BASE + ')*$')
11 _MAX_STREAM_NAME_LENGTH = 4096 11 _MAX_STREAM_NAME_LENGTH = 4096
12 12
13 _MAX_TAG_KEY_LENGTH = 64 13 _MAX_TAG_KEY_LENGTH = 64
(...skipping 21 matching lines...) Expand all
35 35
36 Args: 36 Args:
37 k (str): The tag key. 37 k (str): The tag key.
38 v (str): The tag value. 38 v (str): The tag value.
39 39
40 Raises: 40 Raises:
41 ValueError if the tag is not valid. 41 ValueError if the tag is not valid.
42 """ 42 """
43 validate_stream_name(key, maxlen=_MAX_TAG_KEY_LENGTH) 43 validate_stream_name(key, maxlen=_MAX_TAG_KEY_LENGTH)
44 validate_stream_name(value, maxlen=_MAX_TAG_VALUE_LENGTH) 44 validate_stream_name(value, maxlen=_MAX_TAG_VALUE_LENGTH)
OLDNEW
« no previous file with comments | « client/libs/logdog/stream.py ('k') | client/libs/logdog/tests/bootstrap_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698