Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Commit

Permalink
Only display DC closed warning if a date is set
Browse files Browse the repository at this point in the history
  • Loading branch information
sayoun committed Jan 16, 2018
1 parent 7508f48 commit d5601ee
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions gandi/cli/commands/vm.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,9 +287,10 @@ def create(gandi, datacenter, memory, cores, ip_version, bandwidth, login,
try:
gandi.datacenter.is_opened(datacenter, 'iaas')
except DatacenterLimited as exc:
gandi.echo('/!\ Datacenter %s will be closed on %s, '
'please consider using another datacenter.' %
(datacenter, exc.date))
if exc.date:
gandi.echo('/!\ Datacenter %s will be closed on %s, '
'please consider using another datacenter.' %
(datacenter, exc.date))

if gandi.image.is_deprecated(image, datacenter):
gandi.echo('/!\ Image %s is deprecated and will soon be unavailable.'
Expand Down

0 comments on commit d5601ee

Please sign in to comment.