From: Calin Crisan Date: Tue, 13 Sep 2016 18:51:13 +0000 (+0300) Subject: mask files no longer have meta information in their filenames X-Git-Url: http://www.vanbest.org/gitweb/?a=commitdiff_plain;h=5f88b5fdd2f15d698655c5180b56a3d244b00754;p=motioneye-debian mask files no longer have meta information in their filenames --- diff --git a/motioneye/utils.py b/motioneye/utils.py index 50763e7..84d75eb 100644 --- a/motioneye/utils.py +++ b/motioneye/utils.py @@ -23,7 +23,6 @@ import logging import os import re import socket -import struct import sys import time import urllib @@ -48,6 +47,8 @@ except: _SIGNATURE_REGEX = re.compile('[^a-zA-Z0-9/?_.=&{}\[\]":, _-]') _SPECIAL_COOKIE_NAMES = {'expires', 'domain', 'path', 'secure', 'httponly'} +_MASK_WIDTH = 32 + DEV_NULL = open('/dev/null', 'w') @@ -785,48 +786,131 @@ def urlopen(*args, **kwargs): return urllib2.urlopen(*args, **kwargs) -def build_editable_mask_file(editable_mask): - width = editable_mask[0] - height = editable_mask[1] - nx = editable_mask[2] - ny = editable_mask[3] - lines = editable_mask[4:] - - data = struct.pack('