예제 #1
0
 def core_agent_permissions(self):
     try:
         return octal(self.value("core_agent_permissions"))
     except ValueError:
         logger.exception(
             "Invalid core_agent_permissions value, using default of 0o700")
         return 0o700
예제 #2
0
 def core_agent_permissions(self):
     try:
         return octal(self.value("core_agent_permissions"))
     except ValueError as e:
         logger.error(
             "Invalid core_agent_permissions value: %s."
             " Using default: %s",
             repr(e),
             0o700,
         )
         return 0o700
예제 #3
0
def test_octal_raises_valueerror_on_invalid_value():
    try:
        octal("THIS IS INVALID")
    except ValueError:
        pass
예제 #4
0
def test_octal_with_valid_integer():
    assert 0o700 == octal(700)
예제 #5
0
def test_octal_with_valid_string():
    assert 0o700 == octal("700")