Browse Source

unit test passed for py27

Change-Id: Ia139fe0b0e1c498224e5d80541ea74e65eca000f
Jiaming Lin 3 years ago
parent
commit
9accbeecd0
3 changed files with 5 additions and 4 deletions
  1. 1
    0
      kiloeyes/common/alarm_expr_parser.py
  2. 3
    3
      kiloeyes/common/kafka_conn.py
  3. 1
    1
      requirements.txt

+ 1
- 0
kiloeyes/common/alarm_expr_parser.py View File

@@ -275,6 +275,7 @@ expression = (
275 275
 class AlarmExprParser(object):
276 276
     def __init__(self, expr):
277 277
         self._expr = expr
278
+        self._expr.encode('utf8').replace(' ', '')
278 279
         try:
279 280
             self.parseResult = (expression + pyparsing.stringEnd).parseString(
280 281
                 self._expr.replace(' ', ''))[0]

+ 3
- 3
kiloeyes/common/kafka_conn.py View File

@@ -47,9 +47,9 @@ KAFKA_OPTS = [
47 47
                 help=('Specify if the message received should be parsed. '
48 48
                       'If True, message will not be parsed, otherwise '
49 49
                       'messages will be parsed.')),
50
-    cfg.MultiOpt('partitions', item_type=types.Integer(),
51
-                 default=[0],
52
-                 help='The sleep time when no messages on kafka queue.'),
50
+    cfg.ListOpt('partitions', item_type=types.String(),
51
+                default=[0],
52
+                help='The sleep time when no messages on kafka queue.'),
53 53
     cfg.BoolOpt('drop_data', default=False,
54 54
                 help=('Specify if received data should be simply dropped. '
55 55
                       'This parameter is only for testing purposes.')),

+ 1
- 1
requirements.txt View File

@@ -19,4 +19,4 @@ stevedore>=0.14
19 19
 ujson>=1.33
20 20
 babel
21 21
 eventlet
22
-pyparsing
22
+pyparsing==2.0.1

Loading…
Cancel
Save