Skip to content

Commit

Permalink
Update networkresourceprovider.py
Browse files Browse the repository at this point in the history
In line 7121, time.sleep(delay_in_seconds) requires an integer. The first pass works fine, however, in line 7123, delay_in_seconds is set to result.retry_after, which sometimes returns NoneType and causes time.sleep(delay_in_seconds) to fail. By modifying line 7124 to look for 0 or None, it will properly set delay_in_seconds to the integer required.
  • Loading branch information
aarsan committed Sep 23, 2015
1 parent fa3119c commit 61495a0
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7121,7 +7121,7 @@ def create_or_update(self, resource_group_name, network_interface_name, paramete
time.sleep(delay_in_seconds)
result = client2.get_long_running_operation_status(response.azure_async_operation)
delay_in_seconds = result.retry_after
if delay_in_seconds == 0:
if delay_in_seconds == 0 or delay_in_seconds == None:
delay_in_seconds = 15

if client2.long_running_operation_retry_timeout >= 0:
Expand Down

0 comments on commit 61495a0

Please sign in to comment.