diff --git a/bin/backup.py b/bin/backup.py index 8a9bc53..945a751 100644 --- a/bin/backup.py +++ b/bin/backup.py @@ -18,6 +18,7 @@ class ZodbBackuper: will pack the ZODB, perform a full backup, and, if successful, remove all previous (full and incremental) backups.''' fullBackupExts = ('.fs', '.fsz') + allBackupExts = ('.dat', '.deltafs', '.deltafsz') + fullBackupExts toRemoveExts = ('.doc', '.pdf', '.rtf', '.odt') def __init__(self, storageLocation, backupFolder, options): self.storageLocation = storageLocation @@ -140,7 +141,8 @@ class ZodbBackuper: w('Last full backup date: %s' % str(oldestFullBackupDate)) for backupFile in os.listdir(self.backupFolder): fileDate, ext = os.path.splitext(backupFile) - if self.getDate(fileDate) < oldestFullBackupDate: + if (ext in self.allBackupExts) and \ + (self.getDate(fileDate) < oldestFullBackupDate): fullFileName = '%s/%s' % (self.backupFolder, backupFile) w('Removing old backup file %s...' % fullFileName) os.remove(fullFileName) diff --git a/fields/__init__.py b/fields/__init__.py index f766b26..b779cae 100644 --- a/fields/__init__.py +++ b/fields/__init__.py @@ -624,7 +624,7 @@ class Field: # master/slave relationships, we consider it not to be required. return obj.translate('field_required') else: - return None + return # Perform security checks on p_value self.securityCheck(obj, value) # Triggers the sub-class-specific validation for this value @@ -652,16 +652,7 @@ class Field: else: # It is a regular expression if not self.validator.match(value): - # If the regular expression is among the default ones, we - # generate a specific error message. - if self.validator == String.EMAIL: - return obj.translate('bad_email') - elif self.validator == String.URL: - return obj.translate('bad_url') - elif self.validator == String.ALPHANUMERIC: - return obj.translate('bad_alphanumeric') - else: - return obj.translate('field_invalid') + return obj.translate('field_invalid') def store(self, obj, value): '''Stores the p_value (produced by m_getStorableValue) that complies to diff --git a/gen/tr/Appy.pot b/gen/tr/Appy.pot index 68afd08..76ae616 100644 --- a/gen/tr/Appy.pot +++ b/gen/tr/Appy.pot @@ -163,18 +163,6 @@ msgstr "" msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "" - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "" - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "" - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "" diff --git a/gen/tr/ar.po b/gen/tr/ar.po index 42a86b2..433ae10 100644 --- a/gen/tr/ar.po +++ b/gen/tr/ar.po @@ -163,18 +163,6 @@ msgstr "" msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "" - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "" - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "" - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "" diff --git a/gen/tr/de.po b/gen/tr/de.po index 8002a00..22feaf5 100644 --- a/gen/tr/de.po +++ b/gen/tr/de.po @@ -163,18 +163,6 @@ msgstr "Füllen Sie einen reellen Wert ein." msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Präzisieren Sie eine gültige E-Mail-Adresse." - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Präzisieren Sie eine gültige URL." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Bestimmen Sie einen gültigen alfanumerischen Wert." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "Dieser Wert wird in diesem Feld nicht akzeptiert." diff --git a/gen/tr/en.po b/gen/tr/en.po index 6a58495..a4b9a3b 100644 --- a/gen/tr/en.po +++ b/gen/tr/en.po @@ -164,18 +164,6 @@ msgstr "A floating-point number is expected; use the dot as decimal separator, n msgid "bad_date" msgstr "Please specify a valid date." -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Please enter a valid email." - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Please enter a valid URL." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Please enter a valid alphanumeric value." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "The value is not among possible values for this field." diff --git a/gen/tr/es.po b/gen/tr/es.po index 8effdbd..11c3f1f 100644 --- a/gen/tr/es.po +++ b/gen/tr/es.po @@ -163,18 +163,6 @@ msgstr "Un valor real es requerido." msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Por favor especifique un e-mail válido.\"" - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Por favor especifique un URL valído." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Por favor especifique une valor alfanumérico válido." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "Este valor no es permitido para este campo." diff --git a/gen/tr/fr.po b/gen/tr/fr.po index 998a429..6085e6d 100644 --- a/gen/tr/fr.po +++ b/gen/tr/fr.po @@ -164,18 +164,6 @@ msgstr "Une valeur réelle est attendue." msgid "bad_date" msgstr "Veuillez spécifier une date valide." -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Veuillez spécifier un e-mail valide." - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Veuillez spécifier une URL valide." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Veuillez spécifier une valeur alphanumérique valide." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "Cette valeur n'est pas permise pour ce champ." diff --git a/gen/tr/it.po b/gen/tr/it.po index 3f0289e..535f2f3 100644 --- a/gen/tr/it.po +++ b/gen/tr/it.po @@ -163,18 +163,6 @@ msgstr "Ci si aspetta un numero con decimali" msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Digiti un indirizzo e-mail valido" - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Digiti un URL valido." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Digiti un valore alfanumerico valido." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "Il valore digitato non è possibile per questo campo." diff --git a/gen/tr/nl.po b/gen/tr/nl.po index 452dc50..793537c 100644 --- a/gen/tr/nl.po +++ b/gen/tr/nl.po @@ -163,18 +163,6 @@ msgstr "Vul een reële waarde in." msgid "bad_date" msgstr "" -#. Default: "Please enter a valid email." -msgid "bad_email" -msgstr "Specifieer een geldig e-mail adres" - -#. Default: "Please enter a valid URL." -msgid "bad_url" -msgstr "Specifieer een geldig URL." - -#. Default: "Please enter a valid alphanumeric value." -msgid "bad_alphanumeric" -msgstr "Specifieer een geldige alfnumerische waarde." - #. Default: "The value is not among possible values for this field." msgid "bad_select_value" msgstr "Deze waarde wordt niet geaccepteerd voor dit veld."