import libvtd.trusted_system


def UpdateTrustedSystem(file_name):
    """Make sure the TrustedSystem object is up to date."""
    global my_system
    my_system = libvtd.trusted_system.TrustedSystem()
    my_system.AddFile(file_name)

import libvtd.trusted_system


def UpdateTrustedSystem(file_name):
    """Make sure the TrustedSystem object is up to date."""
    global my_system
    if 'my_system' not in globals():
        my_system = libvtd.trusted_system.TrustedSystem()
        my_system.AddFile(file_name)
    my_system.Refresh()

Refresh system instead of clobbering it
Refresh system instead of clobbering it

Otherwise, if we set the Contexts, they'll be gone before we can request the
NextActions!

  import libvtd.trusted_system
  
  
  def UpdateTrustedSystem(file_name):
      """Make sure the TrustedSystem object is up to date."""
      global my_system
+     if 'my_system' not in globals():
-     my_system = libvtd.trusted_system.TrustedSystem()
+         my_system = libvtd.trusted_system.TrustedSystem()
-     my_system.AddFile(file_name)
+         my_system.AddFile(file_name)
+     my_system.Refresh()
  
Refresh system instead of clobbering it
## Code Before:
import libvtd.trusted_system


def UpdateTrustedSystem(file_name):
    """Make sure the TrustedSystem object is up to date."""
    global my_system
    my_system = libvtd.trusted_system.TrustedSystem()
    my_system.AddFile(file_name)

## Instruction:
Refresh system instead of clobbering it
## Code After:
import libvtd.trusted_system


def UpdateTrustedSystem(file_name):
    """Make sure the TrustedSystem object is up to date."""
    global my_system
    if 'my_system' not in globals():
        my_system = libvtd.trusted_system.TrustedSystem()
        my_system.AddFile(file_name)
    my_system.Refresh()
