VirtualBox

Ignore:
Timestamp:
May 25, 2020 1:00:24 PM (5 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
138226
Message:

TestManager/*base.py: Tweaked the month validation for relative timestamps from the xxxx-ago combo box.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/ValidationKit/testmanager/core/base.py

    r84271 r84498  
    616616
    617617    @staticmethod
    618     def validateTs(sValue, aoNilValues = tuple([None, '']), fAllowNull = True):
     618    def validateTs(sValue, aoNilValues = tuple([None, '']), fAllowNull = True, fRelative = False):
    619619        """ Validates a timestamp field. """
    620620        if sValue in aoNilValues:
     
    653653                iHour  = int(oRes.group(4));
    654654                iSec   = int(oRes.group(5));
    655                 if iMonth > 12 or iMonth <= 0:
     655                if iMonth > 12 or (iMonth <= 0 and not fRelative):
    656656                    sError = 'Invalid timestamp month.';
    657657                elif iDay > acDaysOfMonth[iMonth - 1]:
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette