from pprint import pprint


def merge(dbag, staticroutes):
    for route in staticroutes['routes']:
        key = route['network']
        revoke = route['revoke']
        if revoke:
            try:
                del dbag[key]
            except KeyError:
                pass
        else:
            dbag[key] = route

    return dbag

from pprint import pprint


def merge(dbag, staticroutes):
    for route in staticroutes['routes']:
        key = route['network']
        dbag[key] = route
    return dbag

Make deleting static routes in private gw work
CLOUDSTACK-9266: Make deleting static routes in private gw work

  from pprint import pprint
  
  
  def merge(dbag, staticroutes):
      for route in staticroutes['routes']:
          key = route['network']
-         revoke = route['revoke']
-         if revoke:
-             try:
-                 del dbag[key]
-             except KeyError:
-                 pass
-         else:
-             dbag[key] = route
+         dbag[key] = route
- 
      return dbag
  
Make deleting static routes in private gw work
## Code Before:
from pprint import pprint


def merge(dbag, staticroutes):
    for route in staticroutes['routes']:
        key = route['network']
        revoke = route['revoke']
        if revoke:
            try:
                del dbag[key]
            except KeyError:
                pass
        else:
            dbag[key] = route

    return dbag

## Instruction:
Make deleting static routes in private gw work
## Code After:
from pprint import pprint


def merge(dbag, staticroutes):
    for route in staticroutes['routes']:
        key = route['network']
        dbag[key] = route
    return dbag
