Commit 831075b1 authored by Jérome Perrin's avatar Jérome Perrin

pylint

parent 8e54e341
...@@ -49,14 +49,6 @@ def checkWebpageHttpCacheHit(url_list, resolve_list=[], cookie_jar_path=None): ...@@ -49,14 +49,6 @@ def checkWebpageHttpCacheHit(url_list, resolve_list=[], cookie_jar_path=None):
if attr[0] == "href": if attr[0] == "href":
handle_url(attr[1]) handle_url(attr[1])
headers = {
"User-Agent": "test",
"Accept-Encoding": "gzip, deflate",
"Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8",
"Accept-Language": "en-US,en;q=0.5",
# "Connection": "keep-alive"
}
parsed_url_dict = set() parsed_url_dict = set()
def do_request(url): def do_request(url):
if url in parsed_url_dict: return if url in parsed_url_dict: return
......
from zope.interface import implementer from zope.interface import implementer
from slapos.grid.promise import interface from slapos.grid.promise import interface
from slapos.grid.promise.generic import GenericPromise from slapos.grid.promise.generic import GenericPromise
from slapos.grid.promise.generic import TestResult
import re import re
import pytz import pytz
......
...@@ -171,8 +171,8 @@ class RunPromise(GenericPromise): ...@@ -171,8 +171,8 @@ class RunPromise(GenericPromise):
return return
free_space = round(free_space/(1024*1024*1024), 2) free_space = round(free_space/(1024*1024*1024), 2)
self.logger.error('Free disk space low: remaining %s G (threshold: %s G)' % ( self.logger.error('Free disk space low: remaining %s G (threshold: %s G)',
free_space, threshold)) free_space, threshold)
def test(self): def test(self):
return self._test(result_count=1, failure_amount=1) return self._test(result_count=1, failure_amount=1)
......
...@@ -407,7 +407,7 @@ class QemuQMPWrapper(object): ...@@ -407,7 +407,7 @@ class QemuQMPWrapper(object):
self.powerdown() self.powerdown()
system_exited = False system_exited = False
# wait for ~10 seconds if the system exit, else quit Qemu # wait for ~10 seconds if the system exit, else quit Qemu
for i in range(0, 5): for _ in range(0, 5):
for event in self.getEventList(timeout=2, cleanup=True): for event in self.getEventList(timeout=2, cleanup=True):
if event['event'] == 'SHUTDOWN': if event['event'] == 'SHUTDOWN':
# qemu is about to exit # qemu is about to exit
...@@ -569,7 +569,7 @@ class QemuQMPWrapper(object): ...@@ -569,7 +569,7 @@ class QemuQMPWrapper(object):
return return
if mem_size < 0: if mem_size < 0:
raise ValueError("Memory size is not valid: %s" % option_dict) raise ValueError("Memory size is not valid: %s" % mem_size)
elif current_size > mem_size: elif current_size > mem_size:
# Request to remove memory # Request to remove memory
to_remove_size = current_size - mem_size to_remove_size = current_size - mem_size
......
import datetime import datetime
import feedparser
import unittest import unittest
import PyRSS2Gen as RSS2 import PyRSS2Gen as RSS2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment