use raw string (#682)

Cpu usage color (just an updated #376 to fix failed test due to regex)
This commit is contained in:
chestm007 2018-12-21 01:32:29 +11:00 committed by GitHub
parent c9c83bfce4
commit f909d7edfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -51,7 +51,7 @@ class CpuUsage(IntervalModule, ColorRangeModule):
self.prev_busy = defaultdict(int)
self.formatter = Formatter()
self.key = re.findall('usage_cpu\d+', self.format)
self.key = re.findall(r'usage_cpu\d+', self.format)
if len(self.key) == 1:
self.key = self.key[0]
else: