Added extra line breaks to match upstream code
This commit is contained in:
parent
5a7a16588a
commit
e2fcacf579
2 changed files with 9 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ import requests
|
|||
|
||||
from functions.common import *
|
||||
|
||||
|
||||
# Functions
|
||||
def export_io_graph(disk):
|
||||
"""Exports PNG graph using gnuplot, returns file path as str."""
|
||||
|
|
@ -49,6 +50,7 @@ def export_io_graph(disk):
|
|||
|
||||
return out_path
|
||||
|
||||
|
||||
def upload_to_imgur(image_path):
|
||||
"""Upload image to Imgur and return image url as str."""
|
||||
image_data = None
|
||||
|
|
@ -80,6 +82,7 @@ def upload_to_imgur(image_path):
|
|||
image_link = json_data['data']['link']
|
||||
return image_link
|
||||
|
||||
|
||||
def upload_to_nextcloud(image_path, ticket_number, dev_name):
|
||||
"""Upload image to Nextcloud server and return folder url as str."""
|
||||
image_data = None
|
||||
|
|
@ -107,6 +110,7 @@ def upload_to_nextcloud(image_path, ticket_number, dev_name):
|
|||
# Return folder link
|
||||
return BENCHMARK_SERVER['Short Url']
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
||||
|
|
|
|||
|
|
@ -6,15 +6,18 @@ from functions.data import *
|
|||
from functions.io_graph import *
|
||||
from settings.osticket import *
|
||||
|
||||
|
||||
# STATIC VARIABLES
|
||||
KNOWN_DEV_TYPES = ('CPU', 'Disk')
|
||||
|
||||
|
||||
# Regex
|
||||
REGEX_BLOCK_GRAPH = re.compile(r'(▁|▂|▃|▄|▅|▆|▇|█)')
|
||||
REGEX_NVME_SMART_ATTRIBUTES = re.compile(r'^\s*(\d+) / (\w+): (.{28})(.*)$')
|
||||
REGEX_TEMPS = re.compile(r'^\s*(.*?)\s+(idle.*)$')
|
||||
REGEX_SENSOR = re.compile(r'^(.*?)(\s*)$')
|
||||
|
||||
|
||||
# Classes
|
||||
class osTicket():
|
||||
"""Class to track osTicket data and functions."""
|
||||
|
|
@ -469,6 +472,7 @@ class osTicket():
|
|||
# Done
|
||||
self.disconnect()
|
||||
|
||||
|
||||
# Functions
|
||||
def pad_with_dots(s, pad_right=False):
|
||||
"""Replace space padding with dots, returns str."""
|
||||
|
|
@ -480,6 +484,7 @@ def pad_with_dots(s, pad_right=False):
|
|||
s = '.' + s
|
||||
return s
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
print("This file is not meant to be called directly.")
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue